package cn.tedu.controller;


import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.tedu.entity.*;
import cn.tedu.service.*;
import cn.tedu.service.impl.*;
/**
 * 发现杯俱乐部
 * @author waqwb
 *
 */
public class ClubServlet extends HttpServlet {
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		System.out.println("ClubServlet!!!");
		resp.setContentType("text/html;charset=utf-8");
		ClubService cs = new ClubServiceImpl();
		List<FaxianClub> fList = cs.fxbList();
		System.out.println(fList);
		
		List<ClubContent> cList = cs.conList();
		System.out.println(cList);
		
		List<JoinClub> jList = cs.jList();
		System.out.println(jList);
		
		List<ClubResource> resList = cs.resList();
		System.out.println(resList);
		
		req.setAttribute("fList", fList);
		req.setAttribute("cList", cList);
		req.setAttribute("jList", jList);
		req.setAttribute("resList", resList);
		req.getRequestDispatcher("club.jsp").forward(req, resp);
	}
}
